<form class="layui-form ajax _form" method="post" action="{if condition=" isset($data.user_id) "}{:url('home/User/go_edit_member','uid='.$data['user_id'])}{else /}{:url('home/User/go_add_member')}{/if}">
    <div class="layui-form-item">
        <label class="layui-form-label" > 用户名 </label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" placeholder="用户名,用户名长度5-25" required lay-verify="required" name="user_name" value="{$data.user_name|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 昵称 </label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" placeholder="昵称" name="user_nicename" value="{$data.user_nicename|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"> 密码 </label>
        <div class="layui-input-block">
            <input type="text" class="layui-input"  {if condition=" isset($data) !='' "}placeholder="请输入密码,不修改留空"{else /}placeholder="请输入密码" required lay-verify="required" {/if}  name="user_pwd" value="">
        </div>
    </div>
    {if condition=" isset($data) == false "}
    <div class="layui-form-item">
        <label class="layui-form-label" > 金币 </label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="coin" placeholder="0.00" value="{$data.coin|default=''}" data-type="number" data-decimal="2" data-name="">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 积分</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" placeholder="0" value="{$data.score|default=''}" name="score" data-type="number" data-decimal="0" data-name="">
        </div>
    </div>
    {/if}
    <div class="layui-form-item">
        <label class="layui-form-label" > 性别 </label>
        <div class="layui-input-block">
            {if condition="isset($data)"}
                {switch name="$data['sex']"}
                {case value="0"}<input type="radio"  name="sex" checked value="0" title="保密">
                <input type="radio"  name="sex" value="1" title="男">
                <input type="radio"  name="sex" value="2" title="女">{/case}
                {case value="1"}<input type="radio"  name="sex"  value="0" title="保密">
                <input type="radio"  name="sex" checked value="1" title="男">
                <input type="radio"  name="sex" value="2" title="女">{/case}
                {case value="2"}<input type="radio"  name="sex"  value="0" title="保密">
                <input type="radio"  name="sex" value="1" title="男">
                <input type="radio"  name="sex" checked value="2" title="女">{/case}
            {/switch}
            {else /}
                <input type="radio"  name="sex" checked value="0" title="保密">
                <input type="radio"  name="sex" value="1" title="男">
                <input type="radio"  name="sex" value="2" title="女">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 邮箱 </label>
        <div class="layui-input-block">
            <input type="email" class="layui-input" placeholder="请输入邮箱" name="email" value="{$data.email|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 手机号 </label>
        <div class="layui-input-block">
            <input type="mobile" class="layui-input" placeholder="请输入手机号" name="mobile" value="{$data.mobile|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 个人网站</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input"  name="user_url" value="{$data.user_url|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 个人签名 </label>
        <div class="layui-input-block">
            <textarea class="layui-textarea" name="signature" placeholder="">{$data.signature|default=''}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 是否启用 </label>
        <div class="layui-input-block">
            {if condition="isset($data)"} {if condition="$data.status eq 1"}
            <input type="checkbox" name="status" title="启用" checked>{else /}
            <input type="checkbox" name="status" title="启用">{/if} {else / }
            <input type="checkbox" name="status" title="启用" checked> {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 邮箱验证 </label>
        <div class="layui-input-block">
            {if condition="isset($data)"} {if condition="$data.email_confirmed eq 1"}
            <input type="checkbox" name="email_confirmed" title="验证" checked>{else /}
            <input type="checkbox" name="email_confirmed" title="验证">{/if} {else / }
            <input type="checkbox" name="email_confirmed" title="验证"> {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" > 手机验证 </label>
        <div class="layui-input-block">
            {if condition="isset($data)"} {if condition="$data.mobile_confirmed eq 1"}
            <input type="checkbox" name="mobile_confirmed" title="验证" checked>{else /}
            <input type="checkbox" name="mobile_confirmed" title="验证">{/if} {else / }
            <input type="checkbox" name="mobile_confirmed" title="验证"> {/if}
        </div>
    </div>
    <div class="layui-form-item" style="text-align: center;">
        <button class="layui-btn " type="submit">
            <i class="layui-icon layui-icon-ok"></i> 保存
        </button> &nbsp; &nbsp; &nbsp;
        <button class="layui-btn layui-btn-primary" type="reset">
            <i class="layui-icon layui-icon-refresh"></i> 重置
        </button>
    </div>
</form>

